 |
 |
 |
 |
#314836 - 07/20/07 12:54 PM
[7.2.1] - Hop to as a popup menu
|
Enthusiast
Registered: 11/08/03
Posts: 490
Loc: SoCal
|
Had a couple requests for this and threw it together. This essentially removes the 'Hop to:' pulldown and 'Go' button functionality from the bottom of showflat and postlist and makes it a popup menu. Before pic:  After pic (on a different board of course - i can't modify ubbcentral!!  Instructions: Just read the Readme.txt (attached) and do it. You can fiddle with '$jumpbox = $html -> hop_to(40);' and change the number 40 to your liking. The number 40 signifies the number of characters to display for forum/sub-forum(s), before using the '...' continuation. you'd do this in 2 places. showflat.inc.php and postlist.inc.php. no need to fiddle with the ubbthreads.inc.php class, as that is just the default over there. This allows for loooong stuff to be trimmed and then the menu doesn't go bonkers width wise.. Good luck. Notes: 1. you can easily move this menu to the right (over by the pager), but simply editing the tpls. Keep in mind, if there is no right side portal, you might have the popup to wide to fit on screen. 2. you can also duplicate the menus that are on top to down below as well. 3. you may want to edit the language for 'Hop to:' to 'Hop to' to get rid of the colon, if you are anal about it  example:  once again, it's a simple .tpl mod. I've done it, but am time pressed to post here. I'm quite sure someone could take this example and post those mods as a part of this thread though  we have enough tpl gooooos, to be able to slice and dice as needed. Good luck 
Attachments
2459-ReadMe.txt (28 downloads)Description: Prolly want to read it ;)
Edited by sirdude (08/21/07 11:39 PM) Edit Reason: Updated for 7.2.1
_________________________
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#314882 - 07/22/07 10:36 AM
Re: [7.2] - Hop to as a popup menu
[Re: Rose]
|
Power User
Registered: 09/29/06
Posts: 76
|
Ok, my husband looked at this, and he says the "count" parameter in the php function "str_replace" (that is used to set the value of $level for the code added to lib/ubbthreads.inc.php in the mod) was introduced in php version 5.0.0. Our server is using a lower php version, so the value of $level in the mod cannot be set. Also, for some reason, in the new Gallery forum, the Hop To menu didn't appear at the top, but down the bottom where it used to be, was the full menu - sort of like embedded there. Not sure if this is also a PHP version thing. Anyway, until our host gets their act together to upgrade their PHP, I'll have to abandon this. I will come back to it though. 
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#314896 - 07/22/07 09:53 PM
Re: [7.2] - Hop to as a popup menu
[Re: Gizmo]
|
Enthusiast
Registered: 11/08/03
Posts: 490
Loc: SoCal
|
Updated for php4/5 now. Was an easy change. New readme.txt in initial topic post. Btw, only place(s) that you would need to change the value from 40 chars to different is in the call to html->hop_to(40) in either showflat.inc.php or postlist.inc.php or both. No need to change the function itself, as it takes the value you send it. If you don't send it anything. ie: html->hop_to(), the routine will default to 40. One thing to also note. If your .popup_menu_content class has a width restriction on it, you'll have to consider what to do. My classes have width:auto; on them. :2c: And to giz-unit. To change the class for the categories is easy peasy too.
$hopCat = "<tr><td class=\"popup_menu_content\"><a href=\"{$config['BASE_URL']}/ubbthreads.php{$var_start}ubb{$var_eq}cfrm{$var_sep}c{$var_eq}$cat\">$cat_title</a></td></tr>";
change that "popup_menu_content" to oh say... "popup_menu_header" and the categories will be classed appropriately. you can of course use tdheader too.. whatever fluffs your flannel  keep in mind that there are two instances of "popup_menu_content". the 1st one is for the category loop and the 2nd one is for the forum/subforum loop. you'd be changing the 1st one, most likely. Thanks for the input(s) peeps.. Enjoy!
_________________________
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#314967 - 07/26/07 06:46 AM
Re: [7.2] - Hop to as a popup menu
[Re: Zarzal]
|
Enthusiast
Registered: 11/08/03
Posts: 490
Loc: SoCal
|
that only occurs 1 time in postlist.tpl No, it is in two times. Line 229-231 and line 284-286. If You dont remove the second one you get an open jumperlist below the posting list. Can it be that you use a template from 7.2b? The code in your instructions for the galery template looks a little bit different too. line 229-231 is the pager.. you DON'T want to delete that.. 284-286 is the one to delete  and i dl'd 7.2 again just to check. your search needs to be more precise these are two totally different things... one for 'page 3of3 1 2 3' the other for how old 'Hop to:' worked.. we never had 2 hop to's per page before. btw, readme.txt is updated with all the latest changes and suggestions. note: if you are having a problem with the pop-up menu not always being on top. ala what Zarzal has. just add z-index:50; to the inline style declaration. that is only for IE quirks and probably only if your forum number of posts is low enough that the popup actually runs into the 'Display Options' stuff. good luck!
_________________________
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|